﻿<%@ Page Title="My Account - Savory Housing" Language="C#" MasterPageFile="~/administrator/Admin.Master"
    AutoEventWireup="true" CodeBehind="My_Profile.aspx.cs" Inherits="WebApplication.administrator.My_Profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPhead" runat="server">
    <script language="javascript" type="text/javascript">
        function checkPageValidity() {
            var Password = document.getElementById('CPAdmin_txt_Password');
            if (Password.value != '') {
                document.getElementById('div_error').style.display = "none";
                return true;
            }
            else {
                document.getElementById('div_error').style.display = "block";
                document.getElementById('msg_bx1').innerHTML = 'Password required to update profile.';
                return false;
            }
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPAdmin" runat="server">
    <!-- Admin Left Area Start -->
    <div class="admin-left">
        <ul>
            <li><a href="My_Profile.aspx" class="active">My Profile</a></li>
            <li><a href="Change_Password.aspx">Change Password</a></li>
        </ul>
    </div>
    <!-- Admin Left Area End -->
    <div class="admin-right">
        <div class="error_box" id="div_error">
            <span class="fix_error" id="msg_bx1"></span>
            <br />
            <span class="error_description"></span>
        </div>
        <div id="div_UpdateProfileMsg" runat="server" style="display: none;">
            <h2 class="active_tick">
                Your profile is updated successfully.</h2>
        </div>
        <div class="page_title">
            My Account</div>
        <table class="form clearfix">
            <tr>
                <td>
                    <label>
                        Email Address:</label>
                </td>
                <td>
                    <asp:TextBox ID="txt_EmailID" runat="server" CssClass="form-text"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        Username:
                    </label>
                </td>
                <td>
                    <asp:TextBox ID="txt_UserName" runat="server" CssClass="form-text"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span class="red">*</span><label>
                        Current Password:</label>
                </td>
                <td>
                    <asp:TextBox ID="txt_Password" runat="server" CssClass="form-text" TextMode="Password"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btn_UpdateProfile" Text="Update" runat="server" CssClass="reg-blue-round-btn w75"
                        OnClientClick="return checkPageValidity();" 
                        onclick="btn_UpdateProfile_Click" />
                </td>
                <td>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
